<?php 
header("Content-type: textml; charset=utf-8");
echo '<h2>1、学生案例</h2>';
/*$xjn=array('stuno'=>'14110100409','name'=>'徐镜宁','sex'=>'男','birth'=>'1996-05-06','class'=>'计算机14004','major'=>'计算机科学与技术专业');
$xjn['major']='计算机科学与技术专业';
$zqy= array('stuno' => '14110100421','name'=>'赵庆阳','sex'=>'man','birth'=>'1995-10-12','class'=>'计算机14004','major'=>'计算机科学与技术专业');
$zqy['major']='计算机科学与技术';
$xx=array('stuno'=>'224316','name'=>'薛烜','sex'=>'男','birth'=>'1855-01-01','class'=>'计算机14004','major'=>'计算机科学与技术专业');
$xx['major']='计算机科学与技术';
$stus=array($xjn,$zqy,$xx);
var_dump($stus);*/

echo '<h2>2、用户案例</h2>';
$user1=array('username'=>'14110100421','password'=>'123456',
	'sex'=>'男',
	'hobby'=>'跑步',
	'realname'=>'赵庆阳',
	'thumb'=>'thumby.jpg',
	'email'=>'9781152588@qq.com');
$user2=array(
	'username'=>'14110100409',
	'password'=>'445566',
	'realname'=>'徐镜宁',
	'sex'=>'男',
	'hobby'=>'游泳,唱歌,乒乓球,运动',
	'thumb'=>'thumbn.jpg',
	'email'=>'847569389@qq.com'
	);
$users=array();
$users[]=$user1;
$users[]=$user2;

var_dump($users);
foreach ($users as $one) {
	echo '用户名:'.$one['username'].'<br>';
	echo '姓名:'.$one['realname'].'<br>';
}//for($i=0;$i<count($users);$i++){$one=$users[$i];}
echo '<h2>3、视频案例</h2>';
$categoty_movie=array(
	'id'=>'1',
	'categoty_name'=>'电影'
	);
$categoty_series=array(
	'id'=>'2',
	'categoty_name'=>'电视剧'
	);
$categoty_zy=array(
	'id'=>'3',
	'categoty_name'=>'综艺'
	);
$categoty=array($categoty_movie,$categoty_series,$categoty_zy);
$video1=array(
	'id'=>'1',
	'name'=>'美人鱼',
	'intro'=>'还可以',
	'director'=>'周星驰',
	'thumb'=>'fish.jpg',
	'categoty_id'=>1,
	'categoty_name'=>'电影'
);
$video2=array(
	'id'=>'2',
	'name'=>'疯狂动物城',
	'intro'=>'还可以',
	'director'=>'国外导演',
	'thumb'=>'animal.jpg',
	'categoty_id'=>1,
	'categoty_name'=>'电影'
);
$video3=array(
	'id'=>'3',
	'name'=>'花千骨',
	'intro'=>'还可以',
	'director'=>'周星驰',
	'thumb'=>'fish.jpg',
	'categoty_id'=>2,
	'categoty_name'=>'电视剧'
);
$video4=array(
	'id'=>'4',
	'name'=>'琅琊榜',
	'intro'=>'还可以',
	'director'=>'周星驰',
	'thumb'=>'fish.jpg',
	'categoty_id'=>2,
	'categoty_name'=>'电视剧'
);
$video5=array(
	'id'=>'5',
	'name'=>'我是歌手',
	'intro'=>'还可以',
	'director'=>'周星驰',
	'thumb'=>'fish.jpg',
	'categoty_id'=>3,
	'categoty_name'=>'综艺'
);
$video6=array(
	'id'=>'6',
	'name'=>'欢乐喜剧人',
	'intro'=>'还可以',
	'director'=>'周星驰',
	'thumb'=>'fish.jpg',
	'categoty_id'=>3,
	'categoty_name'=>'综艺'
);
$video=array($video1,$video2,$video3,$video4,$video5,$video6);
$videos=array();
$movies=array(
	'categoty_id'=>1,
	'categoty_name'=>'电影',
	'videos'=>array($video1,$video2)
	);
$serise=array(
	'categoty_id'=>2,
	'categoty_name'=>'电视剧',
	'videos'=>array($video3,$video4)
	);
$zy=array(
	'categoty_id'=>3,
	'categoty_name'=>'综艺',
	'videos'=>array($video5,$video6)
	);
$videos[]=$movies;
$videos[]=$serise;
$videos[]=$zy;
 ?>